package cn_dk;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;
import java.util.Set;

/**
 * @Auther:dingkai
 * @date:2021/11/30 0030 下午 2:42
 * @Desc:
 */
@WebServlet(urlPatterns = "/BServlet")
public class BServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        System.out.println("我还是doget");
            // 转发到指定页面
            /*request.getRequestDispatcher("aa.html").forward(request, response);*/
            //转发指定servlet
              request.getRequestDispatcher("AServlet").forward(request,response);
        }
    }

